﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>FooTable - jQuery plugin for responsive HTML tables</title>
    <meta name="viewport"
          content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <link href="../css/footable.core.css?v=2-0-1" rel="stylesheet" type="text/css"/>
    <link href="../css/footable.metro.css" rel="stylesheet" type="text/css"/>
    <link href="css/footable-demos.css" rel="stylesheet" type="text/css"/>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
    <script>
        if (!window.jQuery) { document.write('<script src="js/jquery-1.9.1.min.js"><\/script>'); }
    </script>
    <script src="../js/footable.js?v=2-0-1" type="text/javascript"></script>
    <script src="js/bootstrap-tab.js" type="text/javascript"></script>
    <script src="js/demos.js" type="text/javascript"></script>
</head>
<body>
<div class="demo-container">
    <ul class="breadcrumb">
        <li><a href="http://fooplugins.com/plugins/footable-jquery/">FooTable</a> <span class="divider">&raquo;</span></li>
        <li><a href="index.htm">Demos</a> <span class="divider">&raquo;</span></li>
        <li class="active">Hiding Columns</li>
    </ul>
    <div class="alert">
        A demo showing how to hide a column completely, so it does not show in the table or the row detail.
    </div>
    <ul class="nav nav-tabs">
        <li class="active"><a href="#demo">Demo</a></li>
        <li><a href="#docs">Docs</a></li>
    </ul>
    <div class="tab-content">
        <div class="tab-pane active" id="demo">
            <p>
                Notice the column below named <strong>ID</strong>. When the FooTable is initialized, that column will be hidden. Even when resizing the table to smaller sizes, the detail for the column will not be shown.
            </p>
            <p>
                <a href="#" class="run">Initialize the FooTable!</a>
            </p>
            <table class="footable metro-blue" data-page-size="5">
                <thead>
                <tr>
                    <th data-hide="all" data-ignore="true">
                        ID
                    </th>
                    <th data-toggle="true">
                        First Name
                    </th>
                    <th data-hide="phone,tablet">
                        Job Title
                    </th>
                    <th data-hide="phone,tablet">
                        DOB
                    </th>
                    <th data-hide="phone">
                        Status
                    </th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>1</td>
                    <td>Isidra</td>
                    <td>Traffic Court Referee</td>
                    <td data-value="78025368997">22 Jun 1972</td>
                    <td data-value="1"><span class="status-metro status-active" title="Active">Active</span></td>
                </tr>
                <tr>
                    <td>2</td>
                    <td>Shona</td>
                    <td><a href="#">Airline Transport Pilot</a></td>
                    <td data-value="370961043292">3 Oct 1981</td>
                    <td data-value="2"><span class="status-metro status-disabled" title="Disabled">Disabled</span></td>
                </tr>
                <tr>
                    <td>3</td>
                    <td>Granville</td>
                    <td>Business Services Sales Representative</td>
                    <td data-value="-22133780420">19 Apr 1969</td>
                    <td data-value="3"><span class="status-metro status-suspended" title="Suspended">Suspended</span>
                    </td>
                </tr>
                <tr>
                    <td>4</td>
                    <td>Easer</td>
                    <td>Drywall Stripper</td>
                    <td data-value="250833505574">13 Dec 1977</td>
                    <td data-value="1"><span class="status-metro status-active" title="Active">Active</span></td>
                </tr>
                <tr>
                    <td>5</td>
                    <td>Maple</td>
                    <td>Aviation Tactical Readiness Officer</td>
                    <td data-value="694116650726">30 Dec 1991</td>
                    <td data-value="3"><span class="status-metro status-suspended" title="Suspended">Suspended</span>
                    </td>
                </tr>
                <tr>
                    <td>6</td>
                    <td>Maxine</td>
                    <td><a href="#">Business Services Sales Representative</a></td>
                    <td data-value="561440464855">17 Oct 1987</td>
                    <td data-value="2"><span class="status-metro status-disabled" title="Disabled">Disabled</span></td>
                </tr>
                <tr>
                    <td>7</td>
                    <td>Lorraine</td>
                    <td>Hemodialysis Technician</td>
                    <td data-value="437400551390">11 Nov 1983</td>
                    <td data-value="2"><span class="status-metro status-disabled" title="Disabled">Disabled</span></td>
                </tr>
                <tr>
                    <td>8</td>
                    <td>Lizzee</td>
                    <td>Technical Services Librarian</td>
                    <td data-value="-257733999319">1 Nov 1961</td>
                    <td data-value="3"><span class="status-metro status-suspended" title="Suspended">Suspended</span>
                    </td>
                </tr>
                <tr>
                    <td>9</td>
                    <td>Judi</td>
                    <td>Electrical Lineworker</td>
                    <td data-value="362134712000">23 Jun 1981</td>
                    <td data-value="1"><span class="status-metro status-active" title="Active">Active</span></td>
                </tr>
                <tr>
                    <td>10</td>
                    <td>Lauri</td>
                    <td>Blackjack Supervisor</td>
                    <td data-value="500874333932">15 Nov 1985</td>
                    <td data-value="3"><span class="status-metro status-suspended" title="Suspended">Suspended</span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="tab-pane" id="docs">
            <h4>Setting Up Hidden Columns</h4>

            <p>All you need to do is add a few data attributes for the column:</p>

            <p><code>data-hide="all"</code> - this makes sure the column is hidden at all breakpoints</p>

            <p><code>data-ignore="true"</code> - this makes sure the column is left out the of detail row</p>

            <p>This can be seen for the Job Title column in the example below:</p>

            <pre>&lt;table class=&quot;footable table&quot;&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th data-ignore=&quot;true&quot; data-hide=&quot;all&quot;&gt;ID&lt;/th&gt;
			&lt;th data-toggle=&quot;true&quot;&gt;Name&lt;/th&gt;
			&lt;th data-hide=&quot;phone,tablet&quot;&gt;Status&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;</pre>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('.run').click(function(e){
            e.preventDefault();
            $('table').footable();
        });
    });
</script>
</body>
</html>
